home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / Snippets / Devices / PACKman C / FOR MPW / PACKMan.r < prev   
Encoding:
Text File  |  1994-10-28  |  3.0 KB  |  135 lines  |  [TEXT/MPS ]

  1. // Chooser Package, updated from Scott “Zz” Zimmerman's PACKman pascal sample
  2. //
  3. //    Copyright:    © 1989-94 by Apple Computer, Inc., all rights reserved.
  4. //
  5. // Modification History:
  6. //
  7. //    10/18/94        nick    converted from Pascal
  8. //    10/19/94        nick    updated to reflect info in IM: Devices (pages 1-42 ff)
  9. //                            remove the pack -4096 code resource defintion
  10. //
  11.  
  12.  
  13. #include "Chooser.r"
  14.  
  15.  
  16. type 'Zz  ' as 'STR ';
  17.  
  18. resource 'Zz  ' (0) {
  19.     "PACKMan - Sample device package for Chooser."
  20. };
  21.  
  22. resource 'vers' (1) {
  23.     0x00, 0x00, development, 0x00,
  24.     verUS,
  25.     "0.00d1",
  26.     "0.00d1, Copyright \251 1989-94 Apple Computer, Inc."
  27. };
  28.  
  29. resource 'BNDL' (128) {
  30.     'Zz  ',
  31.     0,
  32.     {
  33.         'ICN#',
  34.         {
  35.             0, 128
  36.         },
  37.         'FREF',
  38.         {
  39.             0, 128
  40.         }
  41.     }
  42. };
  43.  
  44. resource 'FREF' (128) {
  45.     'PRER',
  46.     0,
  47.     ""
  48. };
  49.  
  50.  
  51. resource 'ICN#' (128) {
  52.     { /* array: 2 elements */
  53.         /* [1] */
  54.         $"04 30 40 00 0A 50 A0 00 0B 91 10 02 08 22 08 03"
  55.         $"12 24 04 05 20 28 02 09 40 10 01 11 80 0C 00 A1"
  56.         $"80 03 FF C2 7E 00 FF 04 01 00 7F 04 03 00 1E 08"
  57.         $"04 E0 00 0C 08 E0 00 0A 10 E0 00 09 08 C0 00 06"
  58.         $"04 87 FE 04 02 88 01 04 01 88 00 84 00 88 00 44"
  59.         $"00 88 00 44 00 88 00 C4 01 10 01 88 02 28 03 10"
  60.         $"01 C4 04 E0 00 02 08 00 73 BF FB EE 4C A2 8A 2A"
  61.         $"40 AA AA EA 52 AA AA 24 5E A2 8A EA 73 BE FB 8E",
  62.         /* [2] */
  63.         $"04 30 40 00 0E 70 E0 00 0F F1 F0 02 0F E3 F8 03"
  64.         $"1F E7 FC 07 3F EF FE 0F 7F FF FF 1F FF FF FF BF"
  65.         $"FF FF FF FE 7F FF FF FC 01 FF FF FC 03 FF FF F8"
  66.         $"07 FF FF FC 0F FF FF FE 1F FF FF FF 0F FF FF FE"
  67.         $"07 FF FF FC 03 FF FF FC 01 FF FF FC 00 FF FF FC"
  68.         $"00 FF FF FC 00 FF FF FC 01 FF FF F8 03 EF FF F0"
  69.         $"01 C7 FC E0 00 03 F8 00 73 BF FB EE 7F BE FB EE"
  70.         $"7F BE FB EE 7F BE FB E4 7F BE FB EE 73 BE FB 8E"
  71.     }
  72. };
  73.  
  74. /* Type name for AppleTalk devices... */
  75. resource 'STR ' (-4096) {
  76.     "BogusWriter"
  77. };
  78.  
  79. /* Left button title. */
  80. resource 'STR ' (-4093) {
  81.     "Left"
  82. };
  83.  
  84. /* Right button title. */
  85. resource 'STR ' (-4092) {
  86.     "Right"
  87. };
  88.  
  89. /* String for Chooser to use to label the */
  90. /* list when choosing the device. */
  91. resource 'STR ' (-4091) {
  92.     "BogusWriters:"
  93. };
  94.  
  95. /* Reserved for use by the Chooser. */
  96. resource 'STR ' (-4090) {
  97.     "BogusWriters:"
  98. };
  99.  
  100. /* NBP timeout and retry information for AppleTalk devices. */
  101. resource 'GNRL' (-4096) {
  102.     11,        /* Retry interval    */
  103.     5        /* Retry count        */
  104. };
  105.  
  106. /* Device PACKage resource [IM IV-217]. */
  107. // This is defined in new inside macintosh: devices page 1-42 onwards
  108. // in Zz's pascal sample the code resource was included in the 
  109. // resource in the following way - as the THINK Rez compiler does
  110. // not understand the  $$resource directive we need to build the header
  111. // as described on pages 274 onwards in the THINK C 7 manual.
  112. //
  113. //resource 'PACK' (-4096, purgeable) {
  114. //    128,        /* Device ID */
  115. //    10,            /* Version (1.0)    */
  116. //    usesAppleTalk,
  117. //    noPAP,
  118. //    noPostScript,
  119. //    noMultiples,
  120. //    noLeftButton,
  121. //    noRightButton,
  122. //    usesSavedZoneName,
  123. //    noActualZoneNames,
  124. //    acceptsInit,
  125. //    acceptsNewSel,
  126. //    acceptsFillList,
  127. //    acceptsGetSel,
  128. //    acceptsSelect,
  129. //    acceptsDeselect,
  130. //    ignoresTerminate,
  131. //    $$resource("PACKMan.CODE", 'CODE', 42)
  132. //};
  133.  
  134.  
  135.